package com.jprocms.module.cms.enums;


import java.util.Arrays;

/**
 * @author jprocms
 * 过滤栏目类型  1 默认所有 2 顶层栏目  3 底层栏目
 */
public enum EnumChannelFilterType {
    DEF_ALL(1, "默认所有"),

    TOP_CHANNEL(2, "顶层栏目"),
    BUTTOM_CHANNEL(3, "底层栏目");


    private Integer type;
    private String desc;


    EnumChannelFilterType(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static EnumChannelFilterType getByStatus(Integer status) {
        return Arrays.stream(EnumChannelFilterType.values()).filter(item -> item.type.equals(status)).findFirst().orElse(null);
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
